package com.wanxi.test;

public class PrintArray {
    public static void main(String[] args) {
        int[] array = {23, 4, 54, 6};
        System.out.print("[");
        for (int i = 0; i < array.length; i++) {
            if (i == array.length - 1) {
                System.out.print(array[i]);
            } else {
                System.out.print(array[i] + ", ");
            }

        }
        System.out.print("]");
    }
}
